package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;
import java.util.Date;
@Data
@ApiModel(value = "日志")
@TableName("t_log")
public class LogBean {
    @ApiModelProperty(hidden = true)
    @TableId(value = "pk_logId",type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "登录时间")
    @TableField("l_date")
    private LocalDate date=LocalDate.now();
    @ApiModelProperty(value = "日志内容")
    @TableField("l_content")
    private String content;

    public LogBean() {
    }

    public LogBean(LocalDate date, String content) {
        this.date = date;
        this.content = content;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "LogBean{" +
                "id=" + id +
                ", date=" + date +
                ", content='" + content + '\'' +
                '}';
    }
}
